<?php
##############################################
#
#   商铺
# @ Time : 2017-1-8 - 下午9:20:27
# @ Author : JiangYongWei <1085562810@qq.com>
# @ Encoding : UTF-8 language : PHP
#
##############################################


namespace Admin\Model;

class ShopModel extends AdminBaseModel{
	/*商铺表  */
	protected $tableName = 'shop';	
	
	public function __construct($tableName=''){
		//初始化数据库对象
		if(!empty($tableName)){
			$this -> tableName = $tableName;
		}	
		parent::__construct($this -> tableName);
	}
	
	/**
	 * 获取商铺
	 */
	public function getShop(){
		return $this ->order('shopid desc') -> select();
	}
	
	/**
	* 删除商铺
	* @param int $shopid
	*/
	public function deleteShop($shopid){
		return $this -> where("shopid = $shopid") -> delete();
	}
	
}